﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using MvcGMaps.Models;
using MvcGMaps.ViewModels;

namespace MvcGMaps.DAL
{
    public class UserRepository : GenericRepository<User>
    {
        public UserRepository(MarkersDBEntities context)
            : base(context)
        { 
        
        }

        public User Get(UserModel model)
        {
            var user = context.Users.FirstOrDefault(u => u.Username == model.Username && u.Password == model.Password);

            return user;
        }
    }
}